package collection;

import space.position.Point;

import java.util.Collection;

public class NewForDemo {
    public static void main(String[] args) {
        Point[] points = GetArray.randomPointArray(10, 20, 30, 0, 6);
        for (Point point : points)      // 增强for循环遍历数组时会被编译器编译为普通的for循环
            System.out.println(point);

        System.out.println("---------------------------");

        Collection<Point> pointCollection = Get.getArrayList(points);
        for (Point temp : pointCollection)  // 增强for循环遍历集合时会被编译器编译为迭代器遍历
            System.out.println(temp);
    }
}
